class IOExercise {
    static public void main(String args[]) {
        try {
            StudentInfoList infoList = new StudentInfoList();
            infoList.getStudentInfoFromInput();
            infoList.printAverageInfoToStdout();
            infoList.printAverageInfoToFile("c:\\test\\record.txt");
        } catch (StudentInfoList.InputInfoErrorException e) {
            System.out.println("Application teminated abnormally.");
            e.printStackTrace();
        } catch (StudentInfoList.OutputException e) {
            System.out.println("Application teminated abnormally.");
            e.printStackTrace();
        }
    }
}
